<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
<div id="app">
	<router-link to="/login/16/张三登陆">登陆</router-link>
	<router-link to="/register/18/李四注册">注册</router-link>
	<router-view></router-view>
</div>
<script src="node_modules/vue/dist/vue.js"></script>
<script src="node_modules/vue-router/dist/vue-router.js"></script>
<script>
	var login = {
		template : '<h1>登陆组件===={{ $route.params.id }}===={{ $route.params.name }}</h1>'
	}
	var register = {
		template : '<h1>注册组件===={{ $route.params.id }}===={{ $route.params.name }}</h1>'
	}
	var router = new VueRouter({
		routes : [
			{ path : '/login/:id/:name', component : login},
			{ path : '/register/:id/:name', component : register}
		]
	})
	var vm = new Vue({
		el : '#app',
		data : {},
		router
	})
</script>
</body>
</html>